var parseString = require('xml2js').parseString;
var util = require('util');

var xml = "<xml>" +
            "<business>" +
              "<company>BOE</company>" + 
              "<owner>XXX</owner>" +
              "<employee>" +
                "<firstname>LU</firstname>" +
                "<lastname>PENG</lastname>" +
              "</employee>" +
            "</business>" + 
            "<home>YYY</home>" +
          "</xml>";

parseString(xml,{
  explicitArray : false,
}, function (err, result) {
  /** j */
    console.log(util.inspect(result)); //直接显示JSON对象
    console.log(result.xml.home);  //显示home对应的字符串值
    console.log(util.inspect(result.xml.employee)); //无法显示
});